#ifndef CMYTESTSTYLE_H
#define CMYTESTSTYLE_H

#include <QCommonStyle>
#include <QProxyStyle>
#include <QWindow>
#include <QWidget>



class CMyTestStylePrivate;
class QStyleOptionTab;

class CFluentStyle : public QProxyStyle
{
public:
    CFluentStyle();
    ~CFluentStyle();

    void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *painter,
                       const QWidget *w = nullptr) const override;

    void drawControl(ControlElement element, const QStyleOption *opt, QPainter *painter,
                     const QWidget *widget = nullptr) const override;
#if 0
    QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = nullptr) const override;
#endif

    void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *painter,
                            const QWidget *widget = nullptr) const override;
#if 0
    QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
                                 SubControl sc, const QWidget *widget = nullptr)const override;
#endif
    static QWindow *GetWindow(const QWidget *widget)
    {
        return widget ? widget->window()->windowHandle() : 0;
    }

private:
    void DrawDefaultButton(const QStyleOption *opt, QPainter *p) const;
    void DrawStandardButton(const QStyleOption *opt, QPainter *p, const QWidget *w = nullptr) const;
    const QColor &StandardButtonLabelColor() const;
    const QColor &DefaultButtonLabelColor() const;

    void DrawFluentCheckBox(const QStyleOption *option, QPainter *painter, const QWidget *w) const;

    void tabLayout(const QStyleOptionTab *opt, const QWidget *widget, QRect *textRect, QRect *iconRect) const;

    CMyTestStylePrivate* d_ptr;
};

#endif // CMYTESTSTYLE_H
